package com.huixiong.nio.communicate;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;

/**
 * <描述>
 *
 * @author timothy.yang cloudwise
 * @since 2022-07-05 16:02
 */
public class Client {
    public static void main(String[] args) throws IOException {
        SocketChannel sc = SocketChannel.open();
        sc.connect(new InetSocketAddress("localhost", 8080));
        sc.write(ByteBuffer.wrap(new byte[]{'a','b','c'}));
        System.out.println("waiting...");
    }
}
